﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Page.Master" AutoEventWireup="true" CodeBehind="EmployeeDetail.aspx.cs" Inherits="HealthInsuranceMgm.EmployeeDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
   
     <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <link href="../Styles/styleJs.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
       $(document).ready(function () {
           $("#frmlistEmp").validate({
               errorElement: "span"
           });

       });
    </script>
    <form id="frmlistEmp" runat="server">
        
    <asp:Panel ID="PanelListEmp" runat="server">
     <fieldset>
            <legend> <h3>List Employee</h3></legend>

        <img src="../images/Add.gif" /><a href="EmployeeRegister.aspx">Addnew Record</a><br />
&nbsp;<asp:GridView ID="grvEmp" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="EmpNo"
        onselectedindexchanging="grvEmp_SelectedIndexChanging"
        ClientIDMode="Static" Width="627px" onrowcommand="grvEmp_RowCommand" 
        onsorting="grvEmp_Sorting" AllowSorting="True" 
        onrowdatabound="grvEmp_RowDataBound" 
        onrowdeleting="grvEmp_RowDeleting" 
        
        AllowPaging="True" 
                onpageindexchanging="grvEmp_PageIndexChanging" PageSize="15" 
                BorderColor="#CCCCCC" BorderStyle="Solid">
        <Columns>
            <asp:BoundField DataField="EmpNo" HeaderText="EmpNO" 
                SortExpression="EmpNo" />
                <asp:BoundField DataField="Designation" HeaderText="Designation" />
            <asp:BoundField DataField="Joindate" HeaderText="Joindate" />
            <asp:BoundField DataField="Salary" HeaderText="Salary" />
            <asp:BoundField DataField="FirstName" HeaderText="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="LastName" />
              <asp:BoundField DataField="UserName" HeaderText="UserName" />
                
                  <asp:BoundField DataField="Address" HeaderText="Address" />
            <asp:BoundField DataField="ContactNo" HeaderText="ContactNo" />
              <asp:BoundField DataField="State" HeaderText="State" />
                <asp:BoundField DataField="Country" HeaderText="Country" />
                  <asp:BoundField DataField="City" HeaderText="City" />
            
              
            <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                SelectImageUrl="~/images/Edit.gif" SelectText=""/>
           
           <asp:TemplateField> 
                    <ItemTemplate>
                      
       <asp:LinkButton ID="LinkButton1" 
         CommandArgument='<%# Eval("EmpNo") %>' 
         CommandName="Delete" runat="server">
            <img src="../images/Delete.png" style="border:0px" />
         </asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField> 
        </Columns>
                <PagerSettings PageButtonCount="15" />

    </asp:GridView>
 
    <asp:HiddenField Visible ="true" ID="HiddenField1" runat="server" />
     </fieldset>
    </asp:Panel>

    <asp:Panel ID="PanelUpdateEmp" runat="server">
  <fieldset>
    <legend><h3>Update Info Employee</h3></legend>
     <table>
            <tr>
                <td>Designation:</td>
                 <td style="width: 463px">
                     <asp:TextBox ID="txtdesignation" CssClass="required" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Joindate:</td>
                 <td style="width: 463px">
                     <asp:TextBox ID="txtjoindate" CssClass="required" runat="server"  
                         Width="127px"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Salary:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtsalary" CssClass="required number" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>FirstName:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtfirstname" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
            <tr>
                <td>LastName:</td>
                 <td style="width: 463px">
                   <asp:TextBox ID="txtlastname" CssClass="required" runat="server" Width="191px"></asp:TextBox>
                 </td>
            </tr>
             <tr>
                <td>UserName:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtusername" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
              <tr>
                <td>PassWord:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtpassword" minlength="6" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
              <tr>
                <td>Address:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtaddress" TextMode="MultiLine"  
                         CssClass="required" runat="server" Width="260px" Height="82px"></asp:TextBox></td>
            </tr>
              <tr>
                <td>Contact NO:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtcontact" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
              <tr>
                <td>Country:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtcoutry" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
            <tr>
                <td>State:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtstate" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
              <tr>
                <td>City:</td>
                 <td style="width: 463px"><asp:TextBox ID="txtcity" CssClass="required" runat="server" Width="191px"></asp:TextBox></td>
            </tr>
            
             
             <tr>
                <td></td>
                 <td style="width: 463px">
                     <asp:Button ID="btnupdate" runat="server" Text="Update" onclick="btnupdate_Click" />
                     <asp:Button ID="btnReset" runat="server"  Text="Reset" />
                     <a href="EmployeeDetail.aspx">List Employee</a>
                 </td>
            </tr>
            </table>
  </fieldset>
    </asp:Panel>
   

   </form>

</asp:Content>
